//
//  YJCFileManager.m
//  ProjectDemo
//
//  Created by IOS3 on 2019/1/8.
//  Copyright © 2019 IOS3. All rights reserved.
//

#import "YJCFileManager.h"


#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"\n\n\n##########  class: < %s " "(%d) >" "   method: %s \n" fmt), [[NSString stringWithFormat:@"%s", __FILE__].lastPathComponent UTF8String], __LINE__,  __FUNCTION__, ##__VA_ARGS__);
#endif


@implementation YJCFileManager

// 判断一个文件存在不存在
// 判断一个目录存在不存在


// 创建一个目录
- (void)createDiretory:(NSString *)path {
    NSFileManager *manager = [NSFileManager defaultManager];
    BOOL result = [manager fileExistsAtPath:path];
    if (!result) {
        DLog(@"directory not exists");
        [manager createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:nil];
    }
}





@end



